import time
import greenlet

def test1():
    while True:
        print("——1——")
        g2.switch()

def test2():
    while True:
        print("——2——")
        g1.switch()

g1= greenlet.greenlet(test1)
g2= greenlet.greenlet(test2)

g1.switch()
